package com.haven.webrobotserver.service.impl;

import com.haven.webrobotserver.dao.mybatis.mapper.UserMapper;
import com.haven.webrobotserver.domain.User;
import com.haven.webrobotserver.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {

    @Autowired(required = false)
    private UserMapper  userMapper;

    @Override
    public User getLoginUser(String username, String password) {
        User user = userMapper.findUserByNameAndPassword(username, password);

        return user;
    }
}
